package com.pengweiwei.androidzygote.functions.media;

import androidx.annotation.RawRes;

import java.io.Serializable;

/**
 * Created by Administrator on 2017/9/15.
 */

public class CharactAudio implements Serializable{
    public static final int PLAY_TYPE_NORMAL = 0;
    public static final int PLAY_TYPE_FOLLOW = 1;

    // low, standard, high
    public static final int PRIORITY_LOW = 1;
    public static final int PRIORITY_STANDARD = 2;
    public static final int PRIORITY_HIGH = 3;

    @RawRes
    int audioRes;

    int playType = PLAY_TYPE_NORMAL;

    int priority = PRIORITY_STANDARD;

    public boolean isLoop() {
        return loop;
    }

    public void setLoop(boolean loop) {
        this.loop = loop;
    }

    boolean loop = false;

    public int getAudioRes() {
        return audioRes;
    }

    public void setAudioRes(int audioRes) {
        this.audioRes = audioRes;
    }

    public int getPlayType() {
        return playType;
    }

    public void setPlayType(int playType) {
        this.playType = playType;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public CharactAudio(@RawRes int audioRes, int playType, int priority) {
        this.audioRes = audioRes;
        this.playType = playType;
        this.priority = priority;

    }

    public CharactAudio(@RawRes int audioRes, int playType, int priority, boolean loop) {
        this.audioRes = audioRes;
        this.playType = playType;
        this.priority = priority;
        this.loop = loop;

    }

    @Override
    public String toString() {
        return "CharactAudio{" +
                "audioRes=" + audioRes +
                ", playType=" + playType +
                ", priority=" + priority +
                '}';
    }
}
